<!DOCTYPE html>
<html>

<head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>产品迁入引导首页</title>
        <link rel="stylesheet" href="../cloud/yunconfig.css">
        <style>
                .time {
                        font-size: 13px;
                        color: #999;
                }

                .bottom {
                        line-height: 12px;
                }

                .button {
                        padding: 0;
                        float: right;
                }

                .image {
                        width: 128px;
                        display: block;
                }

                .clearfix:before,
                .clearfix:after {
                        display: table;
                        content: "";
                }

                .clearfix:after {
                        clear: both
                }

                .el-input__inner {
                        -webkit-appearance: none;
                        background-color: #FFF;
                        background-image: none;
                        border-radius: 4px;
                        border: 1px solid #DCDFE6;
                        -webkit-box-sizing: border-box;
                        box-sizing: border-box;
                        color: #606266;
                        display: inline-block;
                        font-size: inherit;
                        height: 40px;
                        line-height: 40px;
                        outline: 0;
                        padding: 0 15px;
                        -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
                        transition: border-color .2s cubic-bezier(.645,.045,.355,1);
                        width: auto;
                }

                .el-textarea__inner {
                        display: block;
                        resize: vertical;
                        padding: 5px 15px;
                        line-height: 1.5;
                        -webkit-box-sizing: border-box;
                        box-sizing: border-box;
                        width: auto;
                        font-size: inherit;
                        color: #606266;
                        background-color: #FFF;
                        background-image: none;
                        border: 1px solid #DCDFE6;
                        border-radius: 4px;
                        -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
                        transition: border-color .2s cubic-bezier(.645,.045,.355,1);
                }
        </style>
</head>

<body class="gray-bg">
<div id="main-block" v-cloak>
        <div style="width: 100%;">
                <div class="yunconfig-header">
                        <div style="float: left"><svg class="icon" aria-hidden="true"
                                                      style="height: 40px; width: 40px">
                                <use xlink:href="#icon-kuaisuxiangdao"></use>
                        </svg></div>
                        <div style="float: left; line-height: 50px; margin-left: 15px">产品入库</div>
                </div>
        </div>
        <el-tabs type="border-card" v-model="defaultTabName" style="margin-top: 10px" @tab-click="init">
                <el-tab-pane label="域名添加"  name='addDomain'>
                        <div>
                                <el-form ref="newDomain" :rules="domainrules" :model="newDomain" label-width="180px">
                                        <el-form-item label="会员名" prop="userName">
                                                <el-select v-model="newDomain.userName"
                                                           placeholder="请选择会员"
                                                           filterable
                                                           clearable>
                                                        <el-option v-for="item in userList" :key="item.userName"
                                                                   :label="item.label" :value="item.userName">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="域名" prop="domainName">
                                                <el-input v-model="newDomain.domainName" placeholder="请输入域名"></el-input>
                                        </el-form-item>
                                        <el-form-item label="管理密码" prop="managepass">
                                                <el-input v-model="newDomain.managepass" placeholder="请输入管理密码" show-password></el-input>
                                        </el-form-item>
                                        <el-form-item label="产品类型" prop="productCode">
                                                <el-select v-model="newDomain.productCode"
                                                           placeholder="请选择产品类型">
                                                        <el-option v-for="item in productList" :key="item.productCode"
                                                                   :label="item.productName" :value="item.productCode">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="开通时间" prop="startTime">
                                                <el-date-picker type="date" placeholder="选择开通日期"
                                                                v-model="newDomain.startTime" value-format="timestamp" style="width: 100%;">
                                                </el-date-picker>
                                        </el-form-item>
                                        <el-form-item label="到期时间" prop="endTime">
                                                <el-date-picker type="date" placeholder="选择到期日期"
                                                                v-model="newDomain.endTime" value-format="timestamp" style="width: 100%;">
                                                </el-date-picker>
                                        </el-form-item>
                                        <el-form-item label="状态" prop="status">
                                                <el-select v-model="newDomain.status"
                                                           placeholder="请选择状态">
                                                        <el-option v-for="item in statusList" :key="item.value"
                                                                   :label="item.name" :value="item.value">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="注册商" prop="regtype">
                                                <el-select v-model="newDomain.regtype"
                                                           placeholder="请选择域名注册商">
                                                        <el-option v-for="item in regTypeList" :key="item.val"
                                                                   :label="item.lable" :value="item.val">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="DNS1" prop="dns1">
                                                <el-input v-model="newDomain.dns1"></el-input>
                                        </el-form-item>
                                        <el-form-item label="DNS2" prop="dns2">
                                                <el-input v-model="newDomain.dns2"></el-input>
                                        </el-form-item>
                                        <el-form-item label="备注" v-if="false">
                                                <el-input type="textarea" v-model="newDomain.remark"></el-input>
                                        </el-form-item>
                                        <el-form-item>
                                                <el-button type="primary" onclick="history.go(-1)">返回</el-button>
                                                <el-button type="primary" @click="addNewDomain">添加</el-button>
                                                <el-button @click="resetForm('newDomain')">重置</el-button>
                                        </el-form-item>
                                </el-form>
                        </div>
                </el-tab-pane>
                <el-tab-pane label="虚拟主机添加"  name='addVHost'>
                        <div>
                                <el-form ref="newVHost" :rules="vhostrules" :model="newVHost" label-width="180px">
                                        <el-form-item label="会员名" prop="userAccount">
                                                <el-select v-model="newDomain.userName"
                                                           placeholder="请选择会员"
                                                           filterable
                                                           clearable>
                                                        <el-option v-for="item in userList" :key="item.userName"
                                                                   :label="item.label" :value="item.userName">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="实例名称" prop="webName">
                                                <el-input v-model="newVHost.webName" placeholder="请输入实例名称"></el-input>
                                        </el-form-item>
                                        <el-form-item label="管理密码" prop="managepass" v-if="false">
                                                <el-input v-model="newVHost.managepass" placeholder="请输入管理密码" show-password></el-input>
                                        </el-form-item>
                                        <el-form-item label="产品类型" prop="productCode">
                                                <el-select v-model="newVHost.productCode"
                                                           placeholder="请选择产品类型">
                                                        <el-option v-for="item in productList" :key="item.productCode"
                                                                   :label="item.productName" :value="item.productCode">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="开通时间" prop="startTime">
                                                <el-date-picker type="date" placeholder="选择开通日期"
                                                                v-model="newVHost.startTime" value-format="timestamp" style="width: 100%;">
                                                </el-date-picker>
                                        </el-form-item>
                                        <el-form-item label="到期时间" prop="endTime">
                                                <el-date-picker type="date" placeholder="选择到期日期"
                                                                v-model="newVHost.endTime" value-format="timestamp" style="width: 100%;">
                                                </el-date-picker>
                                        </el-form-item>
                                        <el-form-item label="状态" prop="status" v-if="false">
                                                <el-select v-model="newVHost.status"
                                                           placeholder="请选择状态">
                                                        <el-option v-for="item in statusList" :key="item.value"
                                                                   :label="item.name" :value="item.value">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="注册商" prop="regtype" v-if="false">
                                                <el-select v-model="newVHost.regtype"
                                                           placeholder="请选择虚机注册商">
                                                        <el-option v-for="item in regTypeVhostList" :key="item.val"
                                                                   :label="item.vname" :value="item.val">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="WEB服务器" prop="webSiteServerCode">
                                                <el-select v-model="newVHost.webSiteServerCode"
                                                           placeholder="请选择WEB服务器"  clearable filterable>
                                                        <el-option v-for="item in hostList" :key="item.hostId"
                                                                   :label="`${item.hostId}|${item.comIP}`" :value="item.hostId">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="WEB站点名称" prop="webSiteName">
                                                <el-input v-model="newVHost.webSiteName" placeholder="请输入WEB站点名称"></el-input>
                                        </el-form-item>
                                        <el-form-item label="流量限额" prop="webFlow" v-if="false">
                                                <el-input v-model="newVHost.webFlow">
                                                        <template slot="append">G/月</template>
                                                </el-input>
                                        </el-form-item>
                                        <el-form-item label="空间大小" prop="FtpDiskQuota" v-if="false">
                                                <el-input v-model="newVHost.FtpDiskQuota">
                                                        <template slot="append">MB</template>
                                                </el-input>
                                        </el-form-item>
                                        <el-form-item label="FTP服务器" prop="ftpServerCode">
                                                <el-select v-model="newVHost.ftpServerCode"
                                                           placeholder="请选FTP服务器" clearable filterable>
                                                        <el-option v-for="item in hostList" :key="item.hostId"
                                                                   :label="`${item.hostId}|${item.comIP}`" :value="item.hostId">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="FTP用户名" prop="ftpName">
                                                <el-input v-model="newVHost.ftpName" placeholder="请输入FTP用户名"></el-input>
                                        </el-form-item>
                                        <el-form-item label="FTP密码" prop="ftpPwd">
                                                <el-input v-model="newVHost.ftpPwd" placeholder="请输入FTP密码(选填)" show-password></el-input>
                                        </el-form-item>
                                        <el-form-item label="MSSQL服务器">
                                                <el-select v-model="newVHost.sqlServerCode"
                                                           placeholder="请选择MSSQL服务器" clearable filterable>
                                                        <el-option v-for="item in hostList" :key="item.hostId"
                                                                   :label="`${item.hostId}|${item.comIP}`" :value="item.hostId">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="MSSQL数据库名">
                                                <el-input v-model="newVHost.sqlServerName" placeholder="请输入MSSQL数据库名"></el-input>
                                        </el-form-item>
                                        <el-form-item label="MSSQL数据库密码">
                                                <el-input v-model="newVHost.sqlPwd" placeholder="请输入MSSQL数据库密码(选填)" show-password></el-input>
                                        </el-form-item>
                                        <el-form-item label="MYSQL服务器">
                                                <el-select v-model="newVHost.mysqlServerCode"
                                                           placeholder="请选择MYSQL服务器" clearable filterable>
                                                        <el-option v-for="item in hostList" :key="item.hostId"
                                                                   :label="`${item.hostId}|${item.comIP}`" :value="item.hostId">
                                                        </el-option>
                                                </el-select>
                                        </el-form-item>
                                        <el-form-item label="MYSQL数据库名">
                                                <el-input v-model="newVHost.mysqlName" placeholder="请输入MYSQL数据库名"></el-input>
                                        </el-form-item>
                                        <el-form-item label="MYSQL数据库密码">
                                                <el-input v-model="newVHost.mysqlPwd" placeholder="请输入MYSQL数据库密码(选填)" show-password></el-input>
                                        </el-form-item>
                                        <el-form-item label="备注" v-if="false">
                                                <el-input type="textarea" v-model="newVHost.remark"></el-input>
                                        </el-form-item>
                                        <el-form-item>
                                                <el-button type="primary" onclick="history.go(-1)">返回</el-button>
                                                <el-button type="primary" @click="addNewVHost">添加</el-button>
                                                <el-button @click="resetForm('newVHost')">重置</el-button>
                                        </el-form-item>
                                </el-form>
                        </div>
                </el-tab-pane>
        </el-tabs>
</div>
</body>
<script src="../../public/main.js"></script>
<script language="JavaScript">
    document.write('<link rel="stylesheet" href="' + realPath + '/public/fonts/iconfont.css">');
</script>
<script src="../../public/right.js"></script>
<script src="js/addproduct.js"></script>

</html>
